Repository navigation
Serve an app-supplied 404.html for misses - #53
Merged
Merged
Conversation
commit: |
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
A miss used to return plain text. When the site uploads a 404.html at the root, a miss is answered with that page and status 404, through both the component handler and registerStaticRoutes. Under SPA fallback, extension-less paths still serve index.html, so the page appears for misses such as /missing.js. Under --no-spa, it appears for every miss. Without the page, the plain-text 404 is kept. Documents when --no-spa fits: multi-page and content sites, such as podcast audio and Markdown transcripts, where unknown URLs should 404. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Serve inherited app-storage error pages on missing paths and keep the plain-text fallback when fetching the optional custom page rejects. Cover inherited pages, missing blobs, and rejected fetches with regression tests.
Run prettier on the two new 404 test blocks, which failed `prettier --check` (it is not part of `npm run lint`). Reword the comment in the HTTP handler: a hit still costs one query, but a miss now runs a second query for the app's 404.html. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
billf
force-pushed
the
bill/feat/not-found-page
branch
from
November 11, 2026 00:16
91c2f31 to
4404f5e
Compare
billf
marked this pull request as ready for review
November 11, 2026 00:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack: #49 → #53. Independent of the Range stack (#54 → #55 → #56).
A miss is answered with the app's own
/404.htmland status 404, instead of plain text.What this PR contains
/404.htmlat its root, a miss is answered with that page and status 404, through both the component handler andregisterStaticRoutes. Without the page, the plain-text 404 is kept.index.html. Extension misses such as/missing.jsget the page either way. Under--no-spa, every miss gets the page.--no-spafits, for multi-page and content sites such as podcast audio and Markdown transcripts.--no-spa, a 404 page stored as a blob without a storage ID, an inherited page, and a failed fetch.🤖 Generated with Claude Code